<?php

/*

Plugin Name:  SCRW OG Image

Plugin URI: http://pauloflaherty.com

Description: Add Opengraph, Schema.org and Itemprop thumbnail metadata to header

Version: 0.2

Author: Paul O'Flaherty

Author URI: http://pauloflaherty.com

*/

function scrw_og_img() {
	global $post;
	if ( is_single ()){
	$image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
		echo "\t".'<link rel="image_src" href="'.$image."\" />\n";
		echo "\t".'<meta property="og:image" content="'.$image."\" />\n";
		echo "\t".'<meta itemprop="image" content="'.$image."\" />\n";	
	}
	}
?>